Skip to content

Add tracing support for native method calls via Java FFM API#10718

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 17 commits intomasterfrom
andrea.marziali/ffm-instrument
Mar 31, 2026
Merged

Add tracing support for native method calls via Java FFM API#10718
gh-worker-dd-mergequeue-cf854d[bot] merged 17 commits intomasterfrom
andrea.marziali/ffm-instrument

Conversation

@amarziali
Copy link
Copy Markdown
Contributor

@amarziali amarziali commented Mar 3, 2026

What Does This Do

Introduces automatic tracing of native (downcall) method invocations made through the Java Foreign Function & Memory (FFM) API (available since JDK 22).

  • Adds a new configuration option trace.native.methods that follows the same library[method1,method2] / library[*] format as trace.methods, letting users opt-in to tracing specific native calls.
  • Instruments Linker.downcallHandle(MemorySegment, ...) to wrap the produced MethodHandle with span creation/finalization logic built using MethodHandles.tryFinally + MethodHandles.foldArguments — zero overhead when the handle is not traced.
  • Instruments NativeLibrary to capture the library identity at when the symbol address is resolved. This allow to connect the dot when using:
    • Linker.defaultLookup()
    • Linker.loaderLookup()
    • SymbolLookup.libraryLookup(String name, Arena)
    • SymbolLookup.libraryLookup(Path path, Arena)
  • Spans use operation name trace.native, component trace-ffm.
  • The resource name is lib_name.symbol_name. The lib_name is lowercased. Does not contain path or extension

A note about the library name used to resolve syscalls. Java use internally libsyslookup. I don't know how portable is it. If yes we can strip this prefix. However, today, to say I'd like to trace strlen from the libc the user needs to say that want to trace libsyslookup[strlen]

Motivation

R&D week

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

@amarziali amarziali added the type: enhancement Enhancements and improvements label Mar 3, 2026
@amarziali amarziali requested review from a team as code owners March 3, 2026 09:48
@amarziali amarziali added inst: others All other instrumentations tag: experimental Experimental changes labels Mar 3, 2026
@amarziali amarziali requested a review from mcculls March 3, 2026 09:48
@amarziali amarziali requested a review from a team as a code owner March 3, 2026 09:53
@amarziali amarziali requested review from PerfectSlayer and removed request for a team March 3, 2026 09:53
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 3, 2026

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/ffm-instrument
git_commit_date 1774925260 1774940069
git_commit_sha b7fb6fc ac00550
release_version 1.61.0-SNAPSHOT~b7fb6fc123 1.61.0-SNAPSHOT~ac00550bbb
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1774941900 1774941900
ci_job_id 1553144063 1553144063
ci_pipeline_id 105192275 105192275
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-mqn4jwe1 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-mqn4jwe1 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 2 performance improvements and 1 performance regressions! Performance is the same for 61 metrics, 7 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:Debugger better
[-6.442ms; -1.391ms] or [-9.521%; -2.056%]
63.750ms 67.667ms
scenario:startup:petclinic:appsec:AppSec worse
[+3.989ms; +8.331ms] or [+2.228%; +4.652%]
185.229ms 179.069ms
scenario:startup:petclinic:iast:Debugger better
[-6.661ms; -3.699ms] or [-9.610%; -5.337%]
64.133ms 69.314ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~ac00550bbb, baseline=1.61.0-SNAPSHOT~b7fb6fc123

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1056181
Total [baseline] (8.887 s) : 0, 8887426
Agent [candidate] (1.062 s) : 0, 1061704
Total [candidate] (8.847 s) : 0, 8846920
section iast
Agent [baseline] (1.231 s) : 0, 1231193
Total [baseline] (9.534 s) : 0, 9534497
Agent [candidate] (1.231 s) : 0, 1231355
Total [candidate] (9.579 s) : 0, 9578871
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent iast 1.231 s 175.012 ms (16.6%)
Total tracing 8.887 s -
Total iast 9.534 s 647.071 ms (7.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.062 s -
Agent iast 1.231 s 169.651 ms (16.0%)
Total tracing 8.847 s -
Total iast 9.579 s 731.951 ms (8.3%)
gantt
    title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~ac00550bbb, baseline=1.61.0-SNAPSHOT~b7fb6fc123

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.198 ms) : 0, 1198
BytebuddyAgent [baseline] (629.029 ms) : 0, 629029
BytebuddyAgent [candidate] (633.052 ms) : 0, 633052
AgentMeter [baseline] (29.322 ms) : 0, 29322
AgentMeter [candidate] (29.383 ms) : 0, 29383
GlobalTracer [baseline] (256.754 ms) : 0, 256754
GlobalTracer [candidate] (257.705 ms) : 0, 257705
AppSec [baseline] (31.761 ms) : 0, 31761
AppSec [candidate] (31.781 ms) : 0, 31781
Debugger [baseline] (59.738 ms) : 0, 59738
Debugger [candidate] (59.387 ms) : 0, 59387
Remote Config [baseline] (592.281 µs) : 0, 592
Remote Config [candidate] (607.529 µs) : 0, 608
Telemetry [baseline] (8.094 ms) : 0, 8094
Telemetry [candidate] (8.182 ms) : 0, 8182
Flare Poller [baseline] (3.519 ms) : 0, 3519
Flare Poller [candidate] (4.336 ms) : 0, 4336
section iast
crashtracking [baseline] (1.225 ms) : 0, 1225
crashtracking [candidate] (1.199 ms) : 0, 1199
BytebuddyAgent [baseline] (799.077 ms) : 0, 799077
BytebuddyAgent [candidate] (799.655 ms) : 0, 799655
AgentMeter [baseline] (11.426 ms) : 0, 11426
AgentMeter [candidate] (11.35 ms) : 0, 11350
GlobalTracer [baseline] (248.363 ms) : 0, 248363
GlobalTracer [candidate] (248.517 ms) : 0, 248517
IAST [baseline] (25.528 ms) : 0, 25528
IAST [candidate] (25.445 ms) : 0, 25445
AppSec [baseline] (26.667 ms) : 0, 26667
AppSec [candidate] (26.477 ms) : 0, 26477
Debugger [baseline] (67.667 ms) : 0, 67667
Debugger [candidate] (63.75 ms) : 0, 63750
Remote Config [baseline] (523.775 µs) : 0, 524
Remote Config [candidate] (514.116 µs) : 0, 514
Telemetry [baseline] (10.638 ms) : 0, 10638
Telemetry [candidate] (13.642 ms) : 0, 13642
Flare Poller [baseline] (3.878 ms) : 0, 3878
Flare Poller [candidate] (4.569 ms) : 0, 4569
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~ac00550bbb, baseline=1.61.0-SNAPSHOT~b7fb6fc123

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1069535
Total [baseline] (11.065 s) : 0, 11064501
Agent [candidate] (1.064 s) : 0, 1063891
Total [candidate] (11.008 s) : 0, 11007505
section appsec
Agent [baseline] (1.257 s) : 0, 1256910
Total [baseline] (11.228 s) : 0, 11228128
Agent [candidate] (1.266 s) : 0, 1265858
Total [candidate] (11.125 s) : 0, 11125190
section iast
Agent [baseline] (1.236 s) : 0, 1236087
Total [baseline] (11.399 s) : 0, 11398628
Agent [candidate] (1.236 s) : 0, 1235721
Total [candidate] (11.37 s) : 0, 11370009
section profiling
Agent [baseline] (1.196 s) : 0, 1196433
Total [baseline] (11.109 s) : 0, 11109381
Agent [candidate] (1.192 s) : 0, 1192462
Total [candidate] (11.023 s) : 0, 11023358
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.07 s -
Agent appsec 1.257 s 187.375 ms (17.5%)
Agent iast 1.236 s 166.552 ms (15.6%)
Agent profiling 1.196 s 126.898 ms (11.9%)
Total tracing 11.065 s -
Total appsec 11.228 s 163.628 ms (1.5%)
Total iast 11.399 s 334.127 ms (3.0%)
Total profiling 11.109 s 44.88 ms (0.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent appsec 1.266 s 201.967 ms (19.0%)
Agent iast 1.236 s 171.83 ms (16.2%)
Agent profiling 1.192 s 128.571 ms (12.1%)
Total tracing 11.008 s -
Total appsec 11.125 s 117.685 ms (1.1%)
Total iast 11.37 s 362.504 ms (3.3%)
Total profiling 11.023 s 15.853 ms (0.1%)
gantt
    title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~ac00550bbb, baseline=1.61.0-SNAPSHOT~b7fb6fc123

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.217 ms) : 0, 1217
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (635.842 ms) : 0, 635842
BytebuddyAgent [candidate] (633.343 ms) : 0, 633343
AgentMeter [baseline] (29.628 ms) : 0, 29628
AgentMeter [candidate] (29.427 ms) : 0, 29427
GlobalTracer [baseline] (259.114 ms) : 0, 259114
GlobalTracer [candidate] (257.79 ms) : 0, 257790
AppSec [baseline] (32.322 ms) : 0, 32322
AppSec [candidate] (31.911 ms) : 0, 31911
Debugger [baseline] (61.183 ms) : 0, 61183
Debugger [candidate] (60.319 ms) : 0, 60319
Remote Config [baseline] (603.295 µs) : 0, 603
Remote Config [candidate] (585.233 µs) : 0, 585
Telemetry [baseline] (9.657 ms) : 0, 9657
Telemetry [candidate] (8.151 ms) : 0, 8151
Flare Poller [baseline] (3.608 ms) : 0, 3608
Flare Poller [candidate] (5.07 ms) : 0, 5070
section appsec
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.206 ms) : 0, 1206
BytebuddyAgent [baseline] (663.459 ms) : 0, 663459
BytebuddyAgent [candidate] (666.925 ms) : 0, 666925
AgentMeter [baseline] (12.19 ms) : 0, 12190
AgentMeter [candidate] (12.237 ms) : 0, 12237
GlobalTracer [baseline] (260.4 ms) : 0, 260400
GlobalTracer [candidate] (260.208 ms) : 0, 260208
IAST [baseline] (24.693 ms) : 0, 24693
IAST [candidate] (24.42 ms) : 0, 24420
AppSec [baseline] (179.069 ms) : 0, 179069
AppSec [candidate] (185.229 ms) : 0, 185229
Debugger [baseline] (66.956 ms) : 0, 66956
Debugger [candidate] (66.405 ms) : 0, 66405
Remote Config [baseline] (627.411 µs) : 0, 627
Remote Config [candidate] (652.713 µs) : 0, 653
Telemetry [baseline] (8.406 ms) : 0, 8406
Telemetry [candidate] (8.451 ms) : 0, 8451
Flare Poller [baseline] (3.609 ms) : 0, 3609
Flare Poller [candidate] (3.625 ms) : 0, 3625
section iast
crashtracking [baseline] (1.232 ms) : 0, 1232
crashtracking [candidate] (1.208 ms) : 0, 1208
BytebuddyAgent [baseline] (801.231 ms) : 0, 801231
BytebuddyAgent [candidate] (802.008 ms) : 0, 802008
AgentMeter [baseline] (11.566 ms) : 0, 11566
AgentMeter [candidate] (11.428 ms) : 0, 11428
GlobalTracer [baseline] (249.755 ms) : 0, 249755
GlobalTracer [candidate] (249.273 ms) : 0, 249273
IAST [baseline] (25.634 ms) : 0, 25634
IAST [candidate] (25.482 ms) : 0, 25482
AppSec [baseline] (26.652 ms) : 0, 26652
AppSec [candidate] (26.516 ms) : 0, 26516
Debugger [baseline] (69.314 ms) : 0, 69314
Debugger [candidate] (64.133 ms) : 0, 64133
Remote Config [baseline] (531.763 µs) : 0, 532
Remote Config [candidate] (523.584 µs) : 0, 524
Telemetry [baseline] (10.238 ms) : 0, 10238
Telemetry [candidate] (14.497 ms) : 0, 14497
Flare Poller [baseline] (3.682 ms) : 0, 3682
Flare Poller [candidate] (3.89 ms) : 0, 3890
section profiling
crashtracking [baseline] (1.191 ms) : 0, 1191
crashtracking [candidate] (1.201 ms) : 0, 1201
BytebuddyAgent [baseline] (690.654 ms) : 0, 690654
BytebuddyAgent [candidate] (691.105 ms) : 0, 691105
AgentMeter [baseline] (9.092 ms) : 0, 9092
AgentMeter [candidate] (9.118 ms) : 0, 9118
GlobalTracer [baseline] (217.318 ms) : 0, 217318
GlobalTracer [candidate] (215.29 ms) : 0, 215290
AppSec [baseline] (32.717 ms) : 0, 32717
AppSec [candidate] (32.206 ms) : 0, 32206
Debugger [baseline] (66.754 ms) : 0, 66754
Debugger [candidate] (66.006 ms) : 0, 66006
Remote Config [baseline] (576.554 µs) : 0, 577
Remote Config [candidate] (577.212 µs) : 0, 577
Telemetry [baseline] (7.858 ms) : 0, 7858
Telemetry [candidate] (7.818 ms) : 0, 7818
Flare Poller [baseline] (3.557 ms) : 0, 3557
Flare Poller [candidate] (3.495 ms) : 0, 3495
ProfilingAgent [baseline] (95.037 ms) : 0, 95037
ProfilingAgent [candidate] (94.542 ms) : 0, 94542
Profiling [baseline] (95.604 ms) : 0, 95604
Profiling [candidate] (95.11 ms) : 0, 95110
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/ffm-instrument
git_commit_date 1774925260 1774940069
git_commit_sha b7fb6fc ac00550
release_version 1.61.0-SNAPSHOT~b7fb6fc123 1.61.0-SNAPSHOT~ac00550bbb
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1774942379 1774942379
ci_job_id 1553144064 1553144064
ci_pipeline_id 105192275 105192275
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-iadd5xnj 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-iadd5xnj 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 3 performance regressions! Performance is the same for 17 metrics, 16 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:profiling:high_load worse
[+35.754µs; +196.030µs] or [+2.067%; +11.332%]
unstable
[+17.811µs; +919.060µs] or [+0.349%; +18.023%]
unstable
[-412.150op/s; +80.088op/s] or [-19.629%; +3.814%]
1.846ms 5.568ms 1933.688op/s 1.730ms 5.099ms 2099.719op/s
scenario:load:insecure-bank:iast_GLOBAL:high_load worse
[+137.533µs; +278.783µs] or [+4.907%; +9.947%]
worse
[+167.483µs; +552.886µs] or [+2.125%; +7.015%]
unstable
[-205.158op/s; +72.221op/s] or [-15.921%; +5.605%]
3.011ms 8.242ms 1222.125op/s 2.803ms 7.882ms 1288.594op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~ac00550bbb, baseline=1.61.0-SNAPSHOT~b7fb6fc123
    dateFormat X
    axisFormat %s
section baseline
no_agent (17.311 ms) : 17137, 17485
.   : milestone, 17311,
appsec (18.669 ms) : 18479, 18859
.   : milestone, 18669,
code_origins (18.002 ms) : 17824, 18180
.   : milestone, 18002,
iast (18.222 ms) : 18040, 18404
.   : milestone, 18222,
profiling (19.529 ms) : 19333, 19724
.   : milestone, 19529,
tracing (17.819 ms) : 17642, 17996
.   : milestone, 17819,
section candidate
no_agent (18.092 ms) : 17910, 18274
.   : milestone, 18092,
appsec (18.702 ms) : 18511, 18893
.   : milestone, 18702,
code_origins (17.874 ms) : 17699, 18050
.   : milestone, 17874,
iast (17.883 ms) : 17703, 18063
.   : milestone, 17883,
profiling (19.705 ms) : 19502, 19907
.   : milestone, 19705,
tracing (17.728 ms) : 17553, 17903
.   : milestone, 17728,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 17.311 ms [17.137 ms, 17.485 ms] -
appsec 18.669 ms [18.479 ms, 18.859 ms] 1.358 ms (7.8%)
code_origins 18.002 ms [17.824 ms, 18.18 ms] 690.79 µs (4.0%)
iast 18.222 ms [18.04 ms, 18.404 ms] 911.047 µs (5.3%)
profiling 19.529 ms [19.333 ms, 19.724 ms] 2.218 ms (12.8%)
tracing 17.819 ms [17.642 ms, 17.996 ms] 507.994 µs (2.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.092 ms [17.91 ms, 18.274 ms] -
appsec 18.702 ms [18.511 ms, 18.893 ms] 610.079 µs (3.4%)
code_origins 17.874 ms [17.699 ms, 18.05 ms] -217.522 µs (-1.2%)
iast 17.883 ms [17.703 ms, 18.063 ms] -208.957 µs (-1.2%)
profiling 19.705 ms [19.502 ms, 19.907 ms] 1.613 ms (8.9%)
tracing 17.728 ms [17.553 ms, 17.903 ms] -364.144 µs (-2.0%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~ac00550bbb, baseline=1.61.0-SNAPSHOT~b7fb6fc123
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.217 ms) : 1205, 1228
.   : milestone, 1217,
iast (3.318 ms) : 3271, 3366
.   : milestone, 3318,
iast_FULL (6.022 ms) : 5960, 6084
.   : milestone, 6022,
iast_GLOBAL (3.558 ms) : 3499, 3617
.   : milestone, 3558,
profiling (2.153 ms) : 2135, 2172
.   : milestone, 2153,
tracing (1.857 ms) : 1842, 1872
.   : milestone, 1857,
section candidate
no_agent (1.219 ms) : 1207, 1231
.   : milestone, 1219,
iast (3.351 ms) : 3302, 3400
.   : milestone, 3351,
iast_FULL (5.957 ms) : 5896, 6018
.   : milestone, 5957,
iast_GLOBAL (3.754 ms) : 3691, 3818
.   : milestone, 3754,
profiling (2.346 ms) : 2323, 2369
.   : milestone, 2346,
tracing (1.907 ms) : 1891, 1924
.   : milestone, 1907,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.217 ms [1.205 ms, 1.228 ms] -
iast 3.318 ms [3.271 ms, 3.366 ms] 2.102 ms (172.8%)
iast_FULL 6.022 ms [5.96 ms, 6.084 ms] 4.806 ms (395.0%)
iast_GLOBAL 3.558 ms [3.499 ms, 3.617 ms] 2.341 ms (192.5%)
profiling 2.153 ms [2.135 ms, 2.172 ms] 936.972 µs (77.0%)
tracing 1.857 ms [1.842 ms, 1.872 ms] 640.645 µs (52.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.219 ms [1.207 ms, 1.231 ms] -
iast 3.351 ms [3.302 ms, 3.4 ms] 2.132 ms (174.9%)
iast_FULL 5.957 ms [5.896 ms, 6.018 ms] 4.738 ms (388.7%)
iast_GLOBAL 3.754 ms [3.691 ms, 3.818 ms] 2.535 ms (208.0%)
profiling 2.346 ms [2.323 ms, 2.369 ms] 1.127 ms (92.4%)
tracing 1.907 ms [1.891 ms, 1.924 ms] 688.191 µs (56.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/ffm-instrument
git_commit_date 1774925260 1774940069
git_commit_sha b7fb6fc ac00550
release_version 1.61.0-SNAPSHOT~b7fb6fc123 1.61.0-SNAPSHOT~ac00550bbb
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1774942108 1774942108
ci_job_id 1553144065 1553144065
ci_pipeline_id 105192275 105192275
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-vgzo786e 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-vgzo786e 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~ac00550bbb, baseline=1.61.0-SNAPSHOT~b7fb6fc123
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.496 ms) : 1484, 1508
.   : milestone, 1496,
appsec (3.856 ms) : 3630, 4082
.   : milestone, 3856,
iast (2.279 ms) : 2209, 2349
.   : milestone, 2279,
iast_GLOBAL (2.331 ms) : 2261, 2401
.   : milestone, 2331,
profiling (2.539 ms) : 2377, 2700
.   : milestone, 2539,
tracing (2.111 ms) : 2057, 2165
.   : milestone, 2111,
section candidate
no_agent (1.494 ms) : 1482, 1505
.   : milestone, 1494,
appsec (3.835 ms) : 3612, 4058
.   : milestone, 3835,
iast (2.291 ms) : 2221, 2361
.   : milestone, 2291,
iast_GLOBAL (2.336 ms) : 2266, 2406
.   : milestone, 2336,
profiling (2.13 ms) : 2073, 2187
.   : milestone, 2130,
tracing (2.098 ms) : 2044, 2151
.   : milestone, 2098,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.496 ms [1.484 ms, 1.508 ms] -
appsec 3.856 ms [3.63 ms, 4.082 ms] 2.36 ms (157.8%)
iast 2.279 ms [2.209 ms, 2.349 ms] 782.831 µs (52.3%)
iast_GLOBAL 2.331 ms [2.261 ms, 2.401 ms] 834.945 µs (55.8%)
profiling 2.539 ms [2.377 ms, 2.7 ms] 1.043 ms (69.7%)
tracing 2.111 ms [2.057 ms, 2.165 ms] 614.958 µs (41.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.494 ms [1.482 ms, 1.505 ms] -
appsec 3.835 ms [3.612 ms, 4.058 ms] 2.341 ms (156.8%)
iast 2.291 ms [2.221 ms, 2.361 ms] 797.75 µs (53.4%)
iast_GLOBAL 2.336 ms [2.266 ms, 2.406 ms] 842.5 µs (56.4%)
profiling 2.13 ms [2.073 ms, 2.187 ms] 636.496 µs (42.6%)
tracing 2.098 ms [2.044 ms, 2.151 ms] 603.931 µs (40.4%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~ac00550bbb, baseline=1.61.0-SNAPSHOT~b7fb6fc123
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.875 s) : 14875000, 14875000
.   : milestone, 14875000,
appsec (15.093 s) : 15093000, 15093000
.   : milestone, 15093000,
iast (18.387 s) : 18387000, 18387000
.   : milestone, 18387000,
iast_GLOBAL (17.993 s) : 17993000, 17993000
.   : milestone, 17993000,
profiling (14.995 s) : 14995000, 14995000
.   : milestone, 14995000,
tracing (14.749 s) : 14749000, 14749000
.   : milestone, 14749000,
section candidate
no_agent (15.001 s) : 15001000, 15001000
.   : milestone, 15001000,
appsec (14.923 s) : 14923000, 14923000
.   : milestone, 14923000,
iast (18.149 s) : 18149000, 18149000
.   : milestone, 18149000,
iast_GLOBAL (17.736 s) : 17736000, 17736000
.   : milestone, 17736000,
profiling (14.954 s) : 14954000, 14954000
.   : milestone, 14954000,
tracing (14.879 s) : 14879000, 14879000
.   : milestone, 14879000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.875 s [14.875 s, 14.875 s] -
appsec 15.093 s [15.093 s, 15.093 s] 218.0 ms (1.5%)
iast 18.387 s [18.387 s, 18.387 s] 3.512 s (23.6%)
iast_GLOBAL 17.993 s [17.993 s, 17.993 s] 3.118 s (21.0%)
profiling 14.995 s [14.995 s, 14.995 s] 120.0 ms (0.8%)
tracing 14.749 s [14.749 s, 14.749 s] -126.0 ms (-0.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.001 s [15.001 s, 15.001 s] -
appsec 14.923 s [14.923 s, 14.923 s] -78.0 ms (-0.5%)
iast 18.149 s [18.149 s, 18.149 s] 3.148 s (21.0%)
iast_GLOBAL 17.736 s [17.736 s, 17.736 s] 2.735 s (18.2%)
profiling 14.954 s [14.954 s, 14.954 s] -47.0 ms (-0.3%)
tracing 14.879 s [14.879 s, 14.879 s] -122.0 ms (-0.8%)

@amarziali amarziali marked this pull request as draft March 4, 2026 08:02
@amarziali amarziali marked this pull request as ready for review March 4, 2026 11:50
// this module is not opened by default hence we are inlining this code into the target to
// circumvent this limitation
try {
final MethodHandle mh =
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be cached by class. However, I don't expect a ton of call to loadLibrary. So IMHO this can be acceptable and kept in this shape

Copy link
Copy Markdown
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main issue to address before this can be merged is whether we can further minimize the startup cost, which mostly relates to adding jdk.internal.loader.* to the allow list for instrumentation.

@amarziali amarziali force-pushed the andrea.marziali/ffm-instrument branch from 705e3c3 to b30744c Compare March 26, 2026 15:13
@amarziali
Copy link
Copy Markdown
Contributor Author

amarziali commented Mar 26, 2026

Main issue to address before this can be merged is whether we can further minimize the startup cost, which mostly relates to adding jdk.internal.loader.* to the allow list for instrumentation.

@mcculls Yes, that was a bit naive on my side—not narrowing the package pulled in more than expected. I’ve now limited it to the minimal set of classes, and the startup tests look much better. Thanks for pushing on that.

@amarziali amarziali requested a review from mcculls March 26, 2026 16:44
Copy link
Copy Markdown
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for narrowing the filter

@amarziali amarziali enabled auto-merge March 31, 2026 07:46
@amarziali amarziali added this pull request to the merge queue Mar 31, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts bot commented Mar 31, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 bot commented Mar 31, 2026

View all feedbacks in Devflow UI.

2026-03-31 07:48:56 UTC ℹ️ Start processing command /merge


2026-03-31 07:49:01 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-03-31 08:54:53 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 31, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit 5750c33 into master Mar 31, 2026
566 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the andrea.marziali/ffm-instrument branch March 31, 2026 08:54
@github-actions github-actions bot added this to the 1.61.0 milestone Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: others All other instrumentations tag: experimental Experimental changes type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants